<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%
	if (session.getAttribute("username") != null) {
		request.getRequestDispatcher(("/catalog.jsp")).forward(request, response);
	}
%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Login</title>
		<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
		<link href="css/register.css" rel="stylesheet" />
		<script src="http://code.jquery.com/jquery-latest.js"></script>
		<script src="bootstrap/js/bootstrap.min.js"></script>
		
		<style>
			body {
				padding-top: 60px;
				/* 60px to make the container go all the way to the bottom of the topbar */
			}
		</style>
	</head>
	
	<body>
		<div class="navbar navbar-inverse navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container">
					<a class="brand" href="#">RentDVD</a>
					<ul class="nav">
						<li class="active"><a href="#">Login</a></li>
					</ul>
					<ul class="nav pull-right">
						<li><button class="btn btn-success" onclick="parent.location='register.jsp'">Sign In</button></li>
					</ul>
				</div>
			</div>
		</div>
	
		<div class="container">
			<form class="form-signin" method="POST" action="login">
				<h2 class="form-signin-heading">Log in</h2>
				<input type="text" name="username" placeholder="Username"/>
				<input type="password" name="password" placeholder="Password"/>
				<button class="btn btn-large btn-primary" type="submit" class="btn">Log in</button>
			</form>
		</div>
	</body>
</html>